new Vue({
    el: '#app',
    data: {
        name: '',
        person: ['胸大', '熊二', '喜羊羊', '小灰灰', '小猪佩奇']
    },
    computed:{
        list(){
            let newarr = [];
            let newName = this.name;
            this.person.forEach(function(item){
                if(item.indexOf(newName) != -1){
                    newarr.push(item);
                }
            });
            return newarr;
        }
    }
})